#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

void bubble(int* brr, int sz) {
	for (int i = 0; i < sz - 1; i++) {
		for (int j = 0; j < sz - 1 - i; j++) {
			if (brr[j] > brr[j+1]) {
				int change = brr[j];
				brr[j] = brr[j+1];
				brr[j+1] = change;
			}
		}
	}
}

int main() {
	int arr[] = { 1,3,22,3,5,6 ,4};
	int sz = sizeof(arr) / sizeof(arr[0]);
	for (int i = 0; i < sz; i++) {
		printf("%d ", arr[i]);
	}
	printf("\n");
	bubble(arr, sz);
	for (int i = 0; i < sz; i++) {
		printf("%d ", arr[i]);
	}
	return 0;
}
